<template>
	<view>
		<view class="body" v-for="(item,index) in operaTion" :key="index">
			<view class="option" @click="toGong(item.operationCode)" hover-class="bg-click">{{item.operationName}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				operaTion:[]
			}
		},
		onLoad(){
			this.getOper()
		},
		methods: {
			getOper(){
				this.operaTion = []
				let url = "/dcloud/mcOperation/mcOperation/list2"
				this.$http.get(url,{
					params:{
						pageNo: 1,
						pageSize: 100,
						'confirmFlag':1
					}
				}).then(res=>{
					if(res.data.success){
						this.operaTion = res.data.result.records
					}
				}).catch(err => {
					console.log(err);
				});
			},
			toGong(e){
				let info = {
					"operation":e
				};
				uni.navigateTo({
					url: '/packageA/mcloud/dcDispatchList?info=' + encodeURIComponent(JSON.stringify(info))
				});
			}
		}
	}
</script>

<style>
	.body {
		width: 100%;
	}
	.option {
		width: 30%;
		float: left;
		height: 100upx;
		background-color: skyblue;
		margin-left: 20upx;
		margin-top: 30upx;
		text-align: center;
		line-height: 100upx;
		font-weight: bold;
		font-size: 28upx;
	}
	.bg-click {
		background-color: rgb(226, 140, 52) !important;
	}
</style>
